chrome renders js different depending on the extension of the file to render [testcase included]

Posted by pakore on Stack Overflow See other posts from Stack Overflow or by pakore
Published on 2010-06-08T15:23:03Z Indexed on 2010/06/08 15:32 UTC
Read the original article Hit count: 232

Filed under:
|
|
|

I was trying to implement an image panner I found here Chrome renders the same document differently depending on the extension of the file requested. I have created a test case, where it works when the file it's not named as test.xhtml

You can download the test case from here

Does anybody know why or how to solve it? I want my files to be .xhtml In IE and FF it works fine.

Code: test.html / test.xhtml (change the name to see that works with one but not with the other).

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<style type="text/css">
/*Default CSS for pan containers*/
.pancontainer {
    position: relative; /*keep this intact*/
    overflow: hidden; /*keep this intact*/
    width: 300px;
    height: 300px;
    border: 1px solid black;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex4/imagepanner.js"></script>
</head>
<body>
<div class="pancontainer" data-orient="center" data-canzoom="yes" style="width: 350px; height: 200px; float: left; position: relative; overflow-x: hidden; overflow-y: hidden; cursor: move; "><img src="./test_files/image.jpg" style="position: absolute; width: 700px; height: 525px; left: -175px; top: -163px; display: block;" />
</div>
</body>
</html>

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html